<template>
  <div class="huodon">
      <!-- [title为标题] [xs为 1就是返回按钮 为空是不显示(xs为1,fh就必须为1)] 
    [icon 空为没有 有就显示图标 el-icon-s-operation][bgcolor 1为白色背景 空为透明]
    [fh 有返回,fh=1;有图标,fh=2]-->
    <Head title="活动详情" xs="1" fh="1" icon="" bgcolor="" />
    <img class="top-img" :src="school.url" alt="" />
    <div class="con">
      <div class="left">
        <span>{{ school.title }}</span>
        <span>{{ school.xiaoti }}</span>
        <div>
          <i class="el-icon-location-outline">{{ school.addr }}</i>
          <span>1250人参加过</span>
        </div>
      </div>
      <div class="rigth">
        <span>￥{{ school.newprice }}</span>
        <span>￥{{ school.price }}</span>
      </div>
    </div>
    <Qiehuan :sch="school" />
  </div>
</template>

<script>
import Head from "@/components/Fb_body/Head.vue";
import Qiehuan from "@/components/Huodon/Qiehuan.vue";

export default {
  name: "huadon",
  data() {
    return {
      school: [],
    };
  },
  methods: {},
  components: { Qiehuan, Head },
  mounted() {
    if(this.$store.state.id!=0){

      this.ajax({
        method: "post",
        url: "/queryAll",
        data: {
          id: this.$store.state.id,
        },
      }).then((res) => {
        this.school = res.data[0];
      });
    }else{
      this.$router.push({name:"Home"});
      // return
    }
  },
};
</script>

<style lang="scss" scoped>
@import "./Huodon.scss";
</style>